package com.caojing.syby.ui.account;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.caojing.syby.R;
import com.caojing.syby.base.BaseActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/*
* 选择身份 界面
* */

public class SelectIdentityActivity extends BaseActivity {


    @Bind(R.id.tv_ni_de_shenfen)
    TextView tvNiDeShenfen;
    @Bind(R.id.iv_select_girl_nor_bg)
    ImageView ivSelectGirlNorBg;
    @Bind(R.id.tv_select_girl_nor_bg)
    TextView tvSelectGirlNorBg;
    @Bind(R.id.iv_select_man_nor_bg)
    ImageView ivSelectManNorBg;
    @Bind(R.id.tv_select_man_nor_bg)
    TextView tvSelectManNorBg;
    @Bind(R.id.iv_select_woman_nor_bg)
    ImageView ivSelectWomanNorBg;
    @Bind(R.id.tv_select_woman_nor_bg)
    TextView tvSelectWomanNorBg;
    @Bind(R.id.btn_finish_submit)
    Button btnFinishSubmit;

    private String sex="";

    @Override
    protected int getLayoutId() {
        return R.layout.activity_select_identity;
    }

    @Override
    protected void initView() {
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onStart() {
        super.onStart();

    }

    @OnClick({R.id.iv_select_girl_nor_bg, R.id.iv_select_man_nor_bg, R.id.iv_select_woman_nor_bg, R.id.btn_finish_submit})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_select_girl_nor_bg:
                ivSelectGirlNorBg.setSelected(true);
                ivSelectManNorBg.setSelected(false);
                ivSelectWomanNorBg.setSelected(false);
                sex="美女";
                break;
            case R.id.iv_select_man_nor_bg:
                ivSelectGirlNorBg.setSelected(false);
                ivSelectManNorBg.setSelected(true);
                ivSelectWomanNorBg.setSelected(false);
                sex="帅哥";
                break;
            case R.id.iv_select_woman_nor_bg:
                ivSelectGirlNorBg.setSelected(false);
                ivSelectManNorBg.setSelected(false);
                ivSelectWomanNorBg.setSelected(true);
                sex="辣妈";
                break;
            case R.id.btn_finish_submit:
                if (sex==""){
                    finish();
                }else {
                    Intent intent = new Intent();
                    intent.putExtra("sex", sex);
                    setResult(2,intent);
                    finish();
                }

                break;
        }
    }
}
